#ifndef _TYPE_H_
#define _TYPE_H_
#include  <stdio.h>
#include  <string.h> 
#include  <stdlib.h>

typedef  unsigned char      uint8_t;
typedef  signed   char      int8_t;
#define  uint8    uint8_t
#define  int8     int8_t
#define  u8       uint8_t

typedef  unsigned short     uint16_t;
typedef  signed   short     int16_t;
#define  uint16   uint16_t
#define  int16    int16_t         
#define  u16      uint16_t

typedef  unsigned int       uint32_t;
typedef  signed   int       int32_t;
#define  uint32   uint32_t 
#define  int32    int32_t
#define  u32      uint32_t

#ifndef __IO
#define __IO     volatile
#endif

#ifndef __weak
#define __weak  __attribute__((weak))  
#endif

#ifndef __WEAK
#define __WEAK  __attribute__((weak))  
#endif

#define  sys_malloc(n)    malloc(n)
#define  sys_free(n)      free(n)

#define   ___FILE___      strrchr(__FILE__, '\\')
#define   SYS_DEBUG(format,...)   printf("[SYS_DEBUG][%s][%s][%d]>>"format"\n",___FILE___,__FUNCTION__,__LINE__, ##__VA_ARGS__);
#endif
